/*
 * #%L
 * Client
 * %%
 * Copyright (C) 2011 Ractoc.com
 * %%
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 *      http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * #L%
 */
package com.ractoc.opengamefinder.client.plugins.messages;

import com.ractoc.pffj.api.BasePluginMessage;

/**
 * Message to request the exact filename of a cached file. 
 * The file requested is identified by the file id, the version and the type.
 * @author ractoc
 * @since 0.1
 */
public class GetCachedFilenameMessage extends BasePluginMessage {
    
    private Integer fileId;
    
    private Integer version;
    
    private String type;

    /**
     * Default constructor.
     */
    public GetCachedFilenameMessage() {
    }
    
    /**
     * Get the file id identifying the cached file.
     * @return The file id.
     */
    public Integer getFileId() {
        return fileId;
    }

    /**
     * Set the file id identifying the cached file.
     * @param fileId The file id.
     */
    public void setFileId(Integer fileId) {
        this.fileId = fileId;
    }

    /**
     * Get the version of the file requested.
     * When a new version is on the server, this will be the new version number.
     * In this case, no filename will be returned since there is no cached file for this version.
     * @return The version number.
     */
    public Integer getVersion() {
        return version;
    }

    /**
     * Set the version of the file requested.
     * When a new version is on the server, this will be the new version number.
     * In this case, no filename will be returned since there is no cached file for this version.
     * @param version The version number.
     */
    public void setVersion(Integer version) {
        this.version = version;
    }

    /**
     * Get the type of the file. This type is used as the extension of the stored file.
     * @return The type of the file.
     */
    public String getType() {
        return type;
    }

    /**
     * Set the type of the file. This type is used as the extension of the stored file.
     * @param type The type of the file.
     */
    public void setType(String type) {
        this.type = type;
    }
    
}
